package com.zhangtai.modules.service.insurance;

import com.zhangtai.modules.dto.EmployeeInsuranceDto;
import com.zhangtai.modules.dto.InsuranceMemberRecordDto;
import com.zhangtai.modules.entity.insurance.EmployeeInsuranceEntity;
import com.zhangtai.utils.PageResult;
import com.zhangtai.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;


/**
 * 
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-11-23 14:28:02
 */

public interface EmployeeInsuranceService {

    @GetMapping("/findEmployeeInsuranceList")
    @ApiOperation(value = "分页查询")
    PageResult queryPage(@RequestParam(value = "keyword", required = false) String keyword,
                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                         @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize);

    List<EmployeeInsuranceDto> getEmployeeList(@RequestParam(value = "insuranceId", required = false) Long insuranceId);

    PageResult<InsuranceMemberRecordDto> getMemberRecord(@RequestParam(value = "orgIds", required = false) List<Long> orgIds,
                                                         @RequestParam(value = "companyName", required = false) String companyName,
                                                         @RequestParam(value = "employeestatus", required = false) String employeestatus,
                                                         @RequestParam(value = "type", required = false) Integer type,
                                                         @RequestParam(value = "securityStatus", required = false) Integer securityStatus,
                                                         @RequestParam(value = "operateName", required = false) String operateName,
                                                         @RequestParam(value = "orgId", required = false) List<Long> orgId,
                                                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                                                         @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize);

    @GetMapping("/infoEmployeeInsurance")
    @ApiOperation(value = "根据id查找")
    EmployeeInsuranceEntity getByIdE(@RequestParam("id") Long id);

    @PostMapping("/saveEmployeeInsurance")
    @ApiOperation(value = "保存")
    R saveE(@RequestBody EmployeeInsuranceEntity entity);

    @PostMapping("/updateEmployeeInsurance")
    @ApiOperation(value = "修改")
    R updateByIdE(@RequestBody EmployeeInsuranceEntity entity);

    @GetMapping("/deleteOneEmployeeInsurance")
    @ApiOperation(value = "根据ID删除")
    R removeOneById(@RequestParam("id") Long id);

    @PostMapping("/deleteEmployeeInsurances")
    @ApiOperation(value = "根据ID集合删除")
    R removeByIdsE(@RequestBody List<Long> ids);
}

